<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>BasePlayer (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="BasePlayer (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":42,"i11":10,"i12":10,"i13":10,"i14":42,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2</a></div>
<h2 title="Class BasePlayer" class="title">Class BasePlayer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.BasePlayer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="ext/cast/CastPlayer.html" title="class in com.google.android.exoplayer2.ext.cast">CastPlayer</a></code>, <code><a href="SimpleExoPlayer.html" title="class in com.google.android.exoplayer2">SimpleExoPlayer</a></code>, <code><a href="testutil/StubExoPlayer.html" title="class in com.google.android.exoplayer2.testutil">StubExoPlayer</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">BasePlayer</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>
implements <a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></pre>
<div class="block">Abstract base <a href="Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a> which implements common implementation independent methods.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.com.google.android.exoplayer2.Player">
<!--   -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;com.google.android.exoplayer2.<a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></h3>
<code><a href="Player.Command.html" title="annotation in com.google.android.exoplayer2">Player.Command</a>, <a href="Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a>, <a href="Player.DiscontinuityReason.html" title="annotation in com.google.android.exoplayer2">Player.DiscontinuityReason</a>, <a href="Player.EventFlags.html" title="annotation in com.google.android.exoplayer2">Player.EventFlags</a>, <a href="Player.EventListener.html" title="interface in com.google.android.exoplayer2">Player.EventListener</a>, <a href="Player.Events.html" title="class in com.google.android.exoplayer2">Player.Events</a>, <a href="Player.Listener.html" title="interface in com.google.android.exoplayer2">Player.Listener</a>, <a href="Player.MediaItemTransitionReason.html" title="annotation in com.google.android.exoplayer2">Player.MediaItemTransitionReason</a>, <a href="Player.PlaybackSuppressionReason.html" title="annotation in com.google.android.exoplayer2">Player.PlaybackSuppressionReason</a>, <a href="Player.PlayWhenReadyChangeReason.html" title="annotation in com.google.android.exoplayer2">Player.PlayWhenReadyChangeReason</a>, <a href="Player.PositionInfo.html" title="class in com.google.android.exoplayer2">Player.PositionInfo</a>, <a href="Player.RepeatMode.html" title="annotation in com.google.android.exoplayer2">Player.RepeatMode</a>, <a href="Player.State.html" title="annotation in com.google.android.exoplayer2">Player.State</a>, <a href="Player.TimelineChangeReason.html" title="annotation in com.google.android.exoplayer2">Player.TimelineChangeReason</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="Timeline.Window.html" title="class in com.google.android.exoplayer2">Timeline.Window</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#window">window</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.com.google.android.exoplayer2.Player">
<!--   -->
</a>
<h3>Fields inherited from interface&nbsp;com.google.android.exoplayer2.<a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></h3>
<code><a href="Player.html#COMMAND_ADJUST_DEVICE_VOLUME">COMMAND_ADJUST_DEVICE_VOLUME</a>, <a href="Player.html#COMMAND_CHANGE_MEDIA_ITEMS">COMMAND_CHANGE_MEDIA_ITEMS</a>, <a href="Player.html#COMMAND_GET_AUDIO_ATTRIBUTES">COMMAND_GET_AUDIO_ATTRIBUTES</a>, <a href="Player.html#COMMAND_GET_CURRENT_MEDIA_ITEM">COMMAND_GET_CURRENT_MEDIA_ITEM</a>, <a href="Player.html#COMMAND_GET_DEVICE_VOLUME">COMMAND_GET_DEVICE_VOLUME</a>, <a href="Player.html#COMMAND_GET_MEDIA_ITEMS">COMMAND_GET_MEDIA_ITEMS</a>, <a href="Player.html#COMMAND_GET_MEDIA_ITEMS_METADATA">COMMAND_GET_MEDIA_ITEMS_METADATA</a>, <a href="Player.html#COMMAND_GET_TEXT">COMMAND_GET_TEXT</a>, <a href="Player.html#COMMAND_GET_VOLUME">COMMAND_GET_VOLUME</a>, <a href="Player.html#COMMAND_PLAY_PAUSE">COMMAND_PLAY_PAUSE</a>, <a href="Player.html#COMMAND_PREPARE_STOP">COMMAND_PREPARE_STOP</a>, <a href="Player.html#COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM">COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM</a>, <a href="Player.html#COMMAND_SEEK_TO_DEFAULT_POSITION">COMMAND_SEEK_TO_DEFAULT_POSITION</a>, <a href="Player.html#COMMAND_SEEK_TO_MEDIA_ITEM">COMMAND_SEEK_TO_MEDIA_ITEM</a>, <a href="Player.html#COMMAND_SEEK_TO_NEXT_MEDIA_ITEM">COMMAND_SEEK_TO_NEXT_MEDIA_ITEM</a>, <a href="Player.html#COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM">COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM</a>, <a href="Player.html#COMMAND_SET_DEVICE_VOLUME">COMMAND_SET_DEVICE_VOLUME</a>, <a href="Player.html#COMMAND_SET_REPEAT_MODE">COMMAND_SET_REPEAT_MODE</a>, <a href="Player.html#COMMAND_SET_SHUFFLE_MODE">COMMAND_SET_SHUFFLE_MODE</a>, <a href="Player.html#COMMAND_SET_SPEED_AND_PITCH">COMMAND_SET_SPEED_AND_PITCH</a>, <a href="Player.html#COMMAND_SET_VIDEO_SURFACE">COMMAND_SET_VIDEO_SURFACE</a>, <a href="Player.html#COMMAND_SET_VOLUME">COMMAND_SET_VOLUME</a>, <a href="Player.html#DISCONTINUITY_REASON_AUTO_TRANSITION">DISCONTINUITY_REASON_AUTO_TRANSITION</a>, <a href="Player.html#DISCONTINUITY_REASON_INTERNAL">DISCONTINUITY_REASON_INTERNAL</a>, <a href="Player.html#DISCONTINUITY_REASON_REMOVE">DISCONTINUITY_REASON_REMOVE</a>, <a href="Player.html#DISCONTINUITY_REASON_SEEK">DISCONTINUITY_REASON_SEEK</a>, <a href="Player.html#DISCONTINUITY_REASON_SEEK_ADJUSTMENT">DISCONTINUITY_REASON_SEEK_ADJUSTMENT</a>, <a href="Player.html#DISCONTINUITY_REASON_SKIP">DISCONTINUITY_REASON_SKIP</a>, <a href="Player.html#EVENT_AVAILABLE_COMMANDS_CHANGED">EVENT_AVAILABLE_COMMANDS_CHANGED</a>, <a href="Player.html#EVENT_IS_LOADING_CHANGED">EVENT_IS_LOADING_CHANGED</a>, <a href="Player.html#EVENT_IS_PLAYING_CHANGED">EVENT_IS_PLAYING_CHANGED</a>, <a href="Player.html#EVENT_MEDIA_ITEM_TRANSITION">EVENT_MEDIA_ITEM_TRANSITION</a>, <a href="Player.html#EVENT_MEDIA_METADATA_CHANGED">EVENT_MEDIA_METADATA_CHANGED</a>, <a href="Player.html#EVENT_PLAY_WHEN_READY_CHANGED">EVENT_PLAY_WHEN_READY_CHANGED</a>, <a href="Player.html#EVENT_PLAYBACK_PARAMETERS_CHANGED">EVENT_PLAYBACK_PARAMETERS_CHANGED</a>, <a href="Player.html#EVENT_PLAYBACK_STATE_CHANGED">EVENT_PLAYBACK_STATE_CHANGED</a>, <a href="Player.html#EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED">EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED</a>, <a href="Player.html#EVENT_PLAYER_ERROR">EVENT_PLAYER_ERROR</a>, <a href="Player.html#EVENT_POSITION_DISCONTINUITY">EVENT_POSITION_DISCONTINUITY</a>, <a href="Player.html#EVENT_REPEAT_MODE_CHANGED">EVENT_REPEAT_MODE_CHANGED</a>, <a href="Player.html#EVENT_SHUFFLE_MODE_ENABLED_CHANGED">EVENT_SHUFFLE_MODE_ENABLED_CHANGED</a>, <a href="Player.html#EVENT_STATIC_METADATA_CHANGED">EVENT_STATIC_METADATA_CHANGED</a>, <a href="Player.html#EVENT_TIMELINE_CHANGED">EVENT_TIMELINE_CHANGED</a>, <a href="Player.html#EVENT_TRACKS_CHANGED">EVENT_TRACKS_CHANGED</a>, <a href="Player.html#MEDIA_ITEM_TRANSITION_REASON_AUTO">MEDIA_ITEM_TRANSITION_REASON_AUTO</a>, <a href="Player.html#MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED">MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED</a>, <a href="Player.html#MEDIA_ITEM_TRANSITION_REASON_REPEAT">MEDIA_ITEM_TRANSITION_REASON_REPEAT</a>, <a href="Player.html#MEDIA_ITEM_TRANSITION_REASON_SEEK">MEDIA_ITEM_TRANSITION_REASON_SEEK</a>, <a href="Player.html#PLAY_WHEN_READY_CHANGE_REASON_AUDIO_BECOMING_NOISY">PLAY_WHEN_READY_CHANGE_REASON_AUDIO_BECOMING_NOISY</a>, <a href="Player.html#PLAY_WHEN_READY_CHANGE_REASON_AUDIO_FOCUS_LOSS">PLAY_WHEN_READY_CHANGE_REASON_AUDIO_FOCUS_LOSS</a>, <a href="Player.html#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM">PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM</a>, <a href="Player.html#PLAY_WHEN_READY_CHANGE_REASON_REMOTE">PLAY_WHEN_READY_CHANGE_REASON_REMOTE</a>, <a href="Player.html#PLAY_WHEN_READY_CHANGE_REASON_USER_REQUEST">PLAY_WHEN_READY_CHANGE_REASON_USER_REQUEST</a>, <a href="Player.html#PLAYBACK_SUPPRESSION_REASON_NONE">PLAYBACK_SUPPRESSION_REASON_NONE</a>, <a href="Player.html#PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS">PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS</a>, <a href="Player.html#REPEAT_MODE_ALL">REPEAT_MODE_ALL</a>, <a href="Player.html#REPEAT_MODE_OFF">REPEAT_MODE_OFF</a>, <a href="Player.html#REPEAT_MODE_ONE">REPEAT_MODE_ONE</a>, <a href="Player.html#STATE_BUFFERING">STATE_BUFFERING</a>, <a href="Player.html#STATE_ENDED">STATE_ENDED</a>, <a href="Player.html#STATE_IDLE">STATE_IDLE</a>, <a href="Player.html#STATE_READY">STATE_READY</a>, <a href="Player.html#TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED">TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED</a>, <a href="Player.html#TIMELINE_CHANGE_REASON_SOURCE_UPDATE">TIMELINE_CHANGE_REASON_SOURCE_UPDATE</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">BasePlayer</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addMediaItem(int,com.google.android.exoplayer2.MediaItem)">addMediaItem</a></span>&#8203;(int&nbsp;index,
            <a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem)</code></th>
<td class="colLast">
<div class="block">Adds a media item at the given index of the playlist.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addMediaItem(com.google.android.exoplayer2.MediaItem)">addMediaItem</a></span>&#8203;(<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem)</code></th>
<td class="colLast">
<div class="block">Adds a media item to the end of the playlist.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addMediaItems(java.util.List)">addMediaItems</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="MediaItem.html" title="class in com.google.android.exoplayer2" target="_top">MediaItem</a>&gt;&nbsp;mediaItems)</code></th>
<td class="colLast">
<div class="block">Adds a list of media items to the end of the playlist.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clearMediaItems()">clearMediaItems</a></span>()</code></th>
<td class="colLast">
<div class="block">Clears the playlist.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected <a href="Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAvailableCommands(com.google.android.exoplayer2.Player.Commands)">getAvailableCommands</a></span>&#8203;(<a href="Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a>&nbsp;permanentAvailableCommands)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBufferedPercentage()">getBufferedPercentage</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an estimate of the percentage in the current content window or ad up to which data is
 buffered, or 0 if no estimate is available.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getContentDuration()">getContentDuration</a></span>()</code></th>
<td class="colLast">
<div class="block">If <a href="Player.html#isPlayingAd()"><code>Player.isPlayingAd()</code></a> returns <code>true</code>, returns the duration of the current content
 window in milliseconds, or <a href="C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the duration is not known.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentLiveOffset()">getCurrentLiveOffset</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the offset of the current playback position from the live edge in milliseconds, or
 <a href="C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the current window <a href="Player.html#isCurrentWindowLive()"><code>isn't live</code></a> or the
 offset is unknown.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentManifest()">getCurrentManifest</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the current manifest.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentMediaItem()">getCurrentMediaItem</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the media item of the current window in the timeline.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentTag()">getCurrentTag</a></span>()</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#getCurrentMediaItem()"><code>getCurrentMediaItem()</code></a> and <a href="MediaItem.PlaybackProperties.html#tag"><code>MediaItem.PlaybackProperties.tag</code></a>
     instead.</div>
</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMediaItemAt(int)">getMediaItemAt</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Returns the <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> at the given index.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMediaItemCount()">getMediaItemCount</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>media items</code></a> in the playlist.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNextWindowIndex()">getNextWindowIndex</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the index of the window that will be played if <a href="Player.html#next()"><code>Player.next()</code></a> is called, which may
 depend on the current repeat mode and whether shuffle mode is enabled.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPlaybackError()">getPlaybackError</a></span>()</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="Player.html#getPlayerError()"><code>Player.getPlayerError()</code></a> instead.</div>
</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPreviousWindowIndex()">getPreviousWindowIndex</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the index of the window that will be played if <a href="Player.html#previous()"><code>Player.previous()</code></a> is called, which may
 depend on the current repeat mode and whether shuffle mode is enabled.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasNext()">hasNext</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether a next window exists, which may depend on the current repeat mode and whether
 shuffle mode is enabled.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasPrevious()">hasPrevious</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether a previous window exists, which may depend on the current repeat mode and
 whether shuffle mode is enabled.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCommandAvailable(int)">isCommandAvailable</a></span>&#8203;(int&nbsp;command)</code></th>
<td class="colLast">
<div class="block">Returns whether the provided <a href="Player.Command.html" title="annotation in com.google.android.exoplayer2"><code>Player.Command</code></a> is available.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCurrentWindowDynamic()">isCurrentWindowDynamic</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the current window is dynamic, or <code>false</code> if the <a href="Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is
 empty.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCurrentWindowLive()">isCurrentWindowLive</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the current window is live, or <code>false</code> if the <a href="Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is empty.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isCurrentWindowSeekable()">isCurrentWindowSeekable</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the current window is seekable, or <code>false</code> if the <a href="Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is
 empty.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isPlaying()">isPlaying</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the player is playing, i.e.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#moveMediaItem(int,int)">moveMediaItem</a></span>&#8203;(int&nbsp;currentIndex,
             int&nbsp;newIndex)</code></th>
<td class="colLast">
<div class="block">Moves the media item at the current index to the new index.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#next()">next</a></span>()</code></th>
<td class="colLast">
<div class="block">Seeks to the default position of the next window, which may depend on the current repeat mode
 and whether shuffle mode is enabled.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#pause()">pause</a></span>()</code></th>
<td class="colLast">
<div class="block">Pauses playback.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#play()">play</a></span>()</code></th>
<td class="colLast">
<div class="block">Resumes playback as soon as <a href="Player.html#getPlaybackState()"><code>Player.getPlaybackState()</code></a> == <a href="Player.html#STATE_READY"><code>Player.STATE_READY</code></a>.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#previous()">previous</a></span>()</code></th>
<td class="colLast">
<div class="block">Seeks to the default position of the previous window, which may depend on the current repeat
 mode and whether shuffle mode is enabled.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeMediaItem(int)">removeMediaItem</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Removes the media item at the given index of the playlist.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#seekTo(long)">seekTo</a></span>&#8203;(long&nbsp;positionMs)</code></th>
<td class="colLast">
<div class="block">Seeks to a position specified in milliseconds in the current window.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#seekToDefaultPosition()">seekToDefaultPosition</a></span>()</code></th>
<td class="colLast">
<div class="block">Seeks to the default position associated with the current window.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#seekToDefaultPosition(int)">seekToDefaultPosition</a></span>&#8203;(int&nbsp;windowIndex)</code></th>
<td class="colLast">
<div class="block">Seeks to the default position associated with the specified window.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMediaItem(com.google.android.exoplayer2.MediaItem)">setMediaItem</a></span>&#8203;(<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem)</code></th>
<td class="colLast">
<div class="block">Clears the playlist, adds the specified <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> and resets the position to the
 default position.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMediaItem(com.google.android.exoplayer2.MediaItem,boolean)">setMediaItem</a></span>&#8203;(<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem,
            boolean&nbsp;resetPosition)</code></th>
<td class="colLast">
<div class="block">Clears the playlist and adds the specified <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMediaItem(com.google.android.exoplayer2.MediaItem,long)">setMediaItem</a></span>&#8203;(<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem,
            long&nbsp;startPositionMs)</code></th>
<td class="colLast">
<div class="block">Clears the playlist and adds the specified <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMediaItems(java.util.List)">setMediaItems</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="MediaItem.html" title="class in com.google.android.exoplayer2" target="_top">MediaItem</a>&gt;&nbsp;mediaItems)</code></th>
<td class="colLast">
<div class="block">Clears the playlist, adds the specified <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItems</code></a> and resets the position to
 the default position.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPlaybackSpeed(float)">setPlaybackSpeed</a></span>&#8203;(float&nbsp;speed)</code></th>
<td class="colLast">
<div class="block">Changes the rate at which playback occurs.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stop()">stop</a></span>()</code></th>
<td class="colLast">
<div class="block">Stops playback without resetting the player.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.Player">
<!--   -->
</a>
<h3>Methods inherited from interface&nbsp;com.google.android.exoplayer2.<a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></h3>
<code><a href="Player.html#addListener(com.google.android.exoplayer2.Player.EventListener)">addListener</a>, <a href="Player.html#addListener(com.google.android.exoplayer2.Player.Listener)">addListener</a>, <a href="Player.html#addMediaItems(int,java.util.List)">addMediaItems</a>, <a href="Player.html#clearVideoSurface()">clearVideoSurface</a>, <a href="Player.html#clearVideoSurface(android.view.Surface)">clearVideoSurface</a>, <a href="Player.html#clearVideoSurfaceHolder(android.view.SurfaceHolder)">clearVideoSurfaceHolder</a>, <a href="Player.html#clearVideoSurfaceView(android.view.SurfaceView)">clearVideoSurfaceView</a>, <a href="Player.html#clearVideoTextureView(android.view.TextureView)">clearVideoTextureView</a>, <a href="Player.html#decreaseDeviceVolume()">decreaseDeviceVolume</a>, <a href="Player.html#getApplicationLooper()">getApplicationLooper</a>, <a href="Player.html#getAudioAttributes()">getAudioAttributes</a>, <a href="Player.html#getAvailableCommands()">getAvailableCommands</a>, <a href="Player.html#getBufferedPosition()">getBufferedPosition</a>, <a href="Player.html#getContentBufferedPosition()">getContentBufferedPosition</a>, <a href="Player.html#getContentPosition()">getContentPosition</a>, <a href="Player.html#getCurrentAdGroupIndex()">getCurrentAdGroupIndex</a>, <a href="Player.html#getCurrentAdIndexInAdGroup()">getCurrentAdIndexInAdGroup</a>, <a href="Player.html#getCurrentCues()">getCurrentCues</a>, <a href="Player.html#getCurrentPeriodIndex()">getCurrentPeriodIndex</a>, <a href="Player.html#getCurrentPosition()">getCurrentPosition</a>, <a href="Player.html#getCurrentStaticMetadata()">getCurrentStaticMetadata</a>, <a href="Player.html#getCurrentTimeline()">getCurrentTimeline</a>, <a href="Player.html#getCurrentTrackGroups()">getCurrentTrackGroups</a>, <a href="Player.html#getCurrentTrackSelections()">getCurrentTrackSelections</a>, <a href="Player.html#getCurrentWindowIndex()">getCurrentWindowIndex</a>, <a href="Player.html#getDeviceInfo()">getDeviceInfo</a>, <a href="Player.html#getDeviceVolume()">getDeviceVolume</a>, <a href="Player.html#getDuration()">getDuration</a>, <a href="Player.html#getMediaMetadata()">getMediaMetadata</a>, <a href="Player.html#getPlaybackParameters()">getPlaybackParameters</a>, <a href="Player.html#getPlaybackState()">getPlaybackState</a>, <a href="Player.html#getPlaybackSuppressionReason()">getPlaybackSuppressionReason</a>, <a href="Player.html#getPlayerError()">getPlayerError</a>, <a href="Player.html#getPlayWhenReady()">getPlayWhenReady</a>, <a href="Player.html#getRepeatMode()">getRepeatMode</a>, <a href="Player.html#getShuffleModeEnabled()">getShuffleModeEnabled</a>, <a href="Player.html#getTotalBufferedDuration()">getTotalBufferedDuration</a>, <a href="Player.html#getVideoSize()">getVideoSize</a>, <a href="Player.html#getVolume()">getVolume</a>, <a href="Player.html#increaseDeviceVolume()">increaseDeviceVolume</a>, <a href="Player.html#isDeviceMuted()">isDeviceMuted</a>, <a href="Player.html#isLoading()">isLoading</a>, <a href="Player.html#isPlayingAd()">isPlayingAd</a>, <a href="Player.html#moveMediaItems(int,int,int)">moveMediaItems</a>, <a href="Player.html#prepare()">prepare</a>, <a href="Player.html#release()">release</a>, <a href="Player.html#removeListener(com.google.android.exoplayer2.Player.EventListener)">removeListener</a>, <a href="Player.html#removeListener(com.google.android.exoplayer2.Player.Listener)">removeListener</a>, <a href="Player.html#removeMediaItems(int,int)">removeMediaItems</a>, <a href="Player.html#seekTo(int,long)">seekTo</a>, <a href="Player.html#setDeviceMuted(boolean)">setDeviceMuted</a>, <a href="Player.html#setDeviceVolume(int)">setDeviceVolume</a>, <a href="Player.html#setMediaItems(java.util.List,boolean)">setMediaItems</a>, <a href="Player.html#setMediaItems(java.util.List,int,long)">setMediaItems</a>, <a href="Player.html#setPlaybackParameters(com.google.android.exoplayer2.PlaybackParameters)">setPlaybackParameters</a>, <a href="Player.html#setPlayWhenReady(boolean)">setPlayWhenReady</a>, <a href="Player.html#setRepeatMode(int)">setRepeatMode</a>, <a href="Player.html#setShuffleModeEnabled(boolean)">setShuffleModeEnabled</a>, <a href="Player.html#setVideoSurface(android.view.Surface)">setVideoSurface</a>, <a href="Player.html#setVideoSurfaceHolder(android.view.SurfaceHolder)">setVideoSurfaceHolder</a>, <a href="Player.html#setVideoSurfaceView(android.view.SurfaceView)">setVideoSurfaceView</a>, <a href="Player.html#setVideoTextureView(android.view.TextureView)">setVideoTextureView</a>, <a href="Player.html#setVolume(float)">setVolume</a>, <a href="Player.html#stop(boolean)">stop</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="window">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>window</h4>
<pre>protected final&nbsp;<a href="Timeline.Window.html" title="class in com.google.android.exoplayer2">Timeline.Window</a> window</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BasePlayer</h4>
<pre>public&nbsp;BasePlayer()</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="setMediaItem(com.google.android.exoplayer2.MediaItem)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaItem</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;setMediaItem&#8203;(<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#setMediaItem(com.google.android.exoplayer2.MediaItem)">Player</a></code></span></div>
<div class="block">Clears the playlist, adds the specified <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> and resets the position to the
 default position.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#setMediaItem(com.google.android.exoplayer2.MediaItem)">setMediaItem</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaItem</code> - The new <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</dd>
</dl>
</li>
</ul>
<a id="setMediaItem(com.google.android.exoplayer2.MediaItem,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaItem</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;setMediaItem&#8203;(<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem,
                               long&nbsp;startPositionMs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#setMediaItem(com.google.android.exoplayer2.MediaItem,long)">Player</a></code></span></div>
<div class="block">Clears the playlist and adds the specified <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#setMediaItem(com.google.android.exoplayer2.MediaItem,long)">setMediaItem</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaItem</code> - The new <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</dd>
<dd><code>startPositionMs</code> - The position in milliseconds to start playback from.</dd>
</dl>
</li>
</ul>
<a id="setMediaItem(com.google.android.exoplayer2.MediaItem,boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaItem</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;setMediaItem&#8203;(<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem,
                               boolean&nbsp;resetPosition)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#setMediaItem(com.google.android.exoplayer2.MediaItem,boolean)">Player</a></code></span></div>
<div class="block">Clears the playlist and adds the specified <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#setMediaItem(com.google.android.exoplayer2.MediaItem,boolean)">setMediaItem</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaItem</code> - The new <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</dd>
<dd><code>resetPosition</code> - Whether the playback position should be reset to the default position. If
     false, playback will start from the position defined by <a href="Player.html#getCurrentWindowIndex()"><code>Player.getCurrentWindowIndex()</code></a>
     and <a href="Player.html#getCurrentPosition()"><code>Player.getCurrentPosition()</code></a>.</dd>
</dl>
</li>
</ul>
<a id="setMediaItems(java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaItems</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;setMediaItems&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="MediaItem.html" title="class in com.google.android.exoplayer2" target="_top">MediaItem</a>&gt;&nbsp;mediaItems)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#setMediaItems(java.util.List)">Player</a></code></span></div>
<div class="block">Clears the playlist, adds the specified <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItems</code></a> and resets the position to
 the default position.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#setMediaItems(java.util.List)">setMediaItems</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaItems</code> - The new <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItems</code></a>.</dd>
</dl>
</li>
</ul>
<a id="addMediaItem(int,com.google.android.exoplayer2.MediaItem)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMediaItem</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;addMediaItem&#8203;(int&nbsp;index,
                               <a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#addMediaItem(int,com.google.android.exoplayer2.MediaItem)">Player</a></code></span></div>
<div class="block">Adds a media item at the given index of the playlist.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#addMediaItem(int,com.google.android.exoplayer2.MediaItem)">addMediaItem</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index at which to add the media item. If the index is larger than the size of
     the playlist, the media item is added to the end of the playlist.</dd>
<dd><code>mediaItem</code> - The <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> to add.</dd>
</dl>
</li>
</ul>
<a id="addMediaItem(com.google.android.exoplayer2.MediaItem)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMediaItem</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;addMediaItem&#8203;(<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;mediaItem)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#addMediaItem(com.google.android.exoplayer2.MediaItem)">Player</a></code></span></div>
<div class="block">Adds a media item to the end of the playlist.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#addMediaItem(com.google.android.exoplayer2.MediaItem)">addMediaItem</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaItem</code> - The <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> to add.</dd>
</dl>
</li>
</ul>
<a id="addMediaItems(java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMediaItems</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;addMediaItems&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="MediaItem.html" title="class in com.google.android.exoplayer2" target="_top">MediaItem</a>&gt;&nbsp;mediaItems)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#addMediaItems(java.util.List)">Player</a></code></span></div>
<div class="block">Adds a list of media items to the end of the playlist.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#addMediaItems(java.util.List)">addMediaItems</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaItems</code> - The <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItems</code></a> to add.</dd>
</dl>
</li>
</ul>
<a id="moveMediaItem(int,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>moveMediaItem</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;moveMediaItem&#8203;(int&nbsp;currentIndex,
                                int&nbsp;newIndex)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#moveMediaItem(int,int)">Player</a></code></span></div>
<div class="block">Moves the media item at the current index to the new index.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#moveMediaItem(int,int)">moveMediaItem</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>currentIndex</code> - The current index of the media item to move.</dd>
<dd><code>newIndex</code> - The new index of the media item. If the new index is larger than the size of
     the playlist the item is moved to the end of the playlist.</dd>
</dl>
</li>
</ul>
<a id="removeMediaItem(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeMediaItem</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;removeMediaItem&#8203;(int&nbsp;index)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#removeMediaItem(int)">Player</a></code></span></div>
<div class="block">Removes the media item at the given index of the playlist.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#removeMediaItem(int)">removeMediaItem</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index at which to remove the media item.</dd>
</dl>
</li>
</ul>
<a id="clearMediaItems()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearMediaItems</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;clearMediaItems()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#clearMediaItems()">Player</a></code></span></div>
<div class="block">Clears the playlist.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#clearMediaItems()">clearMediaItems</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="isCommandAvailable(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCommandAvailable</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;isCommandAvailable&#8203;(<a href="Player.Command.html" title="annotation in com.google.android.exoplayer2">@Command</a>
                                        int&nbsp;command)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#isCommandAvailable(int)">Player</a></code></span></div>
<div class="block">Returns whether the provided <a href="Player.Command.html" title="annotation in com.google.android.exoplayer2"><code>Player.Command</code></a> is available.

 <p>This method does not execute the command.

 <p>Executing a command that is not available (for example, calling <a href="Player.html#next()"><code>Player.next()</code></a> if <a href="Player.html#COMMAND_SEEK_TO_NEXT_MEDIA_ITEM"><code>Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM</code></a> is unavailable) will neither throw an exception nor generate
 a <a href="Player.html#getPlayerError()"><code>Player.getPlayerError()</code></a> player error}.

 <p><a href="Player.html#COMMAND_SEEK_TO_NEXT_MEDIA_ITEM"><code>Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM</code></a> and <a href="Player.html#COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM"><code>Player.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM</code></a>
 are unavailable if there is no such <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#isCommandAvailable(int)">isCommandAvailable</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>command</code> - A <a href="Player.Command.html" title="annotation in com.google.android.exoplayer2"><code>Player.Command</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether the <a href="Player.Command.html" title="annotation in com.google.android.exoplayer2"><code>Player.Command</code></a> is available.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Player.Listener.html#onAvailableCommandsChanged(com.google.android.exoplayer2.Player.Commands)"><code>Player.Listener.onAvailableCommandsChanged(Commands)</code></a></dd>
</dl>
</li>
</ul>
<a id="getPlaybackError()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlaybackError</h4>
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
@Nullable
public final&nbsp;<a href="ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a>&nbsp;getPlaybackError()</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="Player.html#getPlayerError()"><code>Player.getPlayerError()</code></a> instead.</div>
</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getPlaybackError()">getPlaybackError</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="play()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>play</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;play()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#play()">Player</a></code></span></div>
<div class="block">Resumes playback as soon as <a href="Player.html#getPlaybackState()"><code>Player.getPlaybackState()</code></a> == <a href="Player.html#STATE_READY"><code>Player.STATE_READY</code></a>. Equivalent to
 <code>setPlayWhenReady(true)</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#play()">play</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="pause()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pause</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;pause()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#pause()">Player</a></code></span></div>
<div class="block">Pauses playback. Equivalent to <code>setPlayWhenReady(false)</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#pause()">pause</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="isPlaying()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPlaying</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;isPlaying()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#isPlaying()">Player</a></code></span></div>
<div class="block">Returns whether the player is playing, i.e. <a href="Player.html#getCurrentPosition()"><code>Player.getCurrentPosition()</code></a> is advancing.

 <p>If <code>false</code>, then at least one of the following is true:

 <ul>
   <li>The <a href="Player.html#getPlaybackState()"><code>playback state</code></a> is not <a href="Player.html#STATE_READY"><code>ready</code></a>.
   <li>There is no <a href="Player.html#getPlayWhenReady()"><code>intention to play</code></a>.
   <li>Playback is <a href="Player.html#getPlaybackSuppressionReason()"><code>suppressed for other reasons</code></a>.
 </ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#isPlaying()">isPlaying</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether the player is playing.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Player.Listener.html#onIsPlayingChanged(boolean)"><code>Player.Listener.onIsPlayingChanged(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a id="seekToDefaultPosition()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>seekToDefaultPosition</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;seekToDefaultPosition()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#seekToDefaultPosition()">Player</a></code></span></div>
<div class="block">Seeks to the default position associated with the current window. The position can depend on
 the type of media being played. For live streams it will typically be the live edge of the
 window. For other streams it will typically be the start of the window.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#seekToDefaultPosition()">seekToDefaultPosition</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="seekToDefaultPosition(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>seekToDefaultPosition</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;seekToDefaultPosition&#8203;(int&nbsp;windowIndex)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#seekToDefaultPosition(int)">Player</a></code></span></div>
<div class="block">Seeks to the default position associated with the specified window. The position can depend on
 the type of media being played. For live streams it will typically be the live edge of the
 window. For other streams it will typically be the start of the window.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#seekToDefaultPosition(int)">seekToDefaultPosition</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>windowIndex</code> - The index of the window whose associated default position should be seeked
     to.</dd>
</dl>
</li>
</ul>
<a id="seekTo(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>seekTo</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;seekTo&#8203;(long&nbsp;positionMs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#seekTo(long)">Player</a></code></span></div>
<div class="block">Seeks to a position specified in milliseconds in the current window.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#seekTo(long)">seekTo</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>positionMs</code> - The seek position in the current window, or <a href="C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> to seek to
     the window's default position.</dd>
</dl>
</li>
</ul>
<a id="hasPrevious()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasPrevious</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;hasPrevious()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#hasPrevious()">Player</a></code></span></div>
<div class="block">Returns whether a previous window exists, which may depend on the current repeat mode and
 whether shuffle mode is enabled.

 <p>Note: When the repeat mode is <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
 the current repeat mode is <a href="Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
 details.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#hasPrevious()">hasPrevious</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="previous()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>previous</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;previous()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#previous()">Player</a></code></span></div>
<div class="block">Seeks to the default position of the previous window, which may depend on the current repeat
 mode and whether shuffle mode is enabled. Does nothing if <a href="Player.html#hasPrevious()"><code>Player.hasPrevious()</code></a> is <code>
 false</code>.

 <p>Note: When the repeat mode is <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
 the current repeat mode is <a href="Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
 details.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#previous()">previous</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="hasNext()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasNext</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;hasNext()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#hasNext()">Player</a></code></span></div>
<div class="block">Returns whether a next window exists, which may depend on the current repeat mode and whether
 shuffle mode is enabled.

 <p>Note: When the repeat mode is <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
 the current repeat mode is <a href="Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
 details.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#hasNext()">hasNext</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="next()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>next</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;next()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#next()">Player</a></code></span></div>
<div class="block">Seeks to the default position of the next window, which may depend on the current repeat mode
 and whether shuffle mode is enabled. Does nothing if <a href="Player.html#hasNext()"><code>Player.hasNext()</code></a> is <code>false</code>.

 <p>Note: When the repeat mode is <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
 the current repeat mode is <a href="Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
 details.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#next()">next</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="setPlaybackSpeed(float)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPlaybackSpeed</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;setPlaybackSpeed&#8203;(float&nbsp;speed)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#setPlaybackSpeed(float)">Player</a></code></span></div>
<div class="block">Changes the rate at which playback occurs. The pitch is not changed.

 <p>This is equivalent to <code>
 setPlaybackParameters(getPlaybackParameters().withSpeed(speed))</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#setPlaybackSpeed(float)">setPlaybackSpeed</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>speed</code> - The linear factor by which playback will be sped up. Must be higher than 0. 1 is
     normal speed, 2 is twice as fast, 0.5 is half normal speed...</dd>
</dl>
</li>
</ul>
<a id="stop()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;stop()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#stop()">Player</a></code></span></div>
<div class="block">Stops playback without resetting the player. Use <a href="Player.html#pause()"><code>Player.pause()</code></a> rather than this method if
 the intention is to pause playback.

 <p>Calling this method will cause the playback state to transition to <a href="Player.html#STATE_IDLE"><code>Player.STATE_IDLE</code></a>. The
 player instance can still be used, and <a href="Player.html#release()"><code>Player.release()</code></a> must still be called on the player if
 it's no longer required.

 <p>Calling this method does not clear the playlist, reset the playback position or the playback
 error.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#stop()">stop</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="getNextWindowIndex()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextWindowIndex</h4>
<pre class="methodSignature">public final&nbsp;int&nbsp;getNextWindowIndex()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#getNextWindowIndex()">Player</a></code></span></div>
<div class="block">Returns the index of the window that will be played if <a href="Player.html#next()"><code>Player.next()</code></a> is called, which may
 depend on the current repeat mode and whether shuffle mode is enabled. Returns <a href="C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if <a href="Player.html#hasNext()"><code>Player.hasNext()</code></a> is <code>false</code>.

 <p>Note: When the repeat mode is <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
 the current repeat mode is <a href="Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
 details.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getNextWindowIndex()">getNextWindowIndex</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="getPreviousWindowIndex()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreviousWindowIndex</h4>
<pre class="methodSignature">public final&nbsp;int&nbsp;getPreviousWindowIndex()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#getPreviousWindowIndex()">Player</a></code></span></div>
<div class="block">Returns the index of the window that will be played if <a href="Player.html#previous()"><code>Player.previous()</code></a> is called, which may
 depend on the current repeat mode and whether shuffle mode is enabled. Returns <a href="C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if <a href="Player.html#hasPrevious()"><code>Player.hasPrevious()</code></a> is <code>false</code>.

 <p>Note: When the repeat mode is <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
 the current repeat mode is <a href="Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
 details.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getPreviousWindowIndex()">getPreviousWindowIndex</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="getCurrentTag()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentTag</h4>
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
@Nullable
public final&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;getCurrentTag()</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#getCurrentMediaItem()"><code>getCurrentMediaItem()</code></a> and <a href="MediaItem.PlaybackProperties.html#tag"><code>MediaItem.PlaybackProperties.tag</code></a>
     instead.</div>
</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getCurrentTag()">getCurrentTag</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="getCurrentMediaItem()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentMediaItem</h4>
<pre class="methodSignature">@Nullable
public final&nbsp;<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;getCurrentMediaItem()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#getCurrentMediaItem()">Player</a></code></span></div>
<div class="block">Returns the media item of the current window in the timeline. May be null if the timeline is
 empty.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getCurrentMediaItem()">getCurrentMediaItem</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Player.Listener.html#onMediaItemTransition(com.google.android.exoplayer2.MediaItem,int)"><code>Player.Listener.onMediaItemTransition(MediaItem, int)</code></a></dd>
</dl>
</li>
</ul>
<a id="getMediaItemCount()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMediaItemCount</h4>
<pre class="methodSignature">public final&nbsp;int&nbsp;getMediaItemCount()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#getMediaItemCount()">Player</a></code></span></div>
<div class="block">Returns the number of <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>media items</code></a> in the playlist.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getMediaItemCount()">getMediaItemCount</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="getMediaItemAt(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMediaItemAt</h4>
<pre class="methodSignature">public final&nbsp;<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>&nbsp;getMediaItemAt&#8203;(int&nbsp;index)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#getMediaItemAt(int)">Player</a></code></span></div>
<div class="block">Returns the <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> at the given index.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getMediaItemAt(int)">getMediaItemAt</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="getCurrentManifest()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentManifest</h4>
<pre class="methodSignature">@Nullable
public final&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;getCurrentManifest()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#getCurrentManifest()">Player</a></code></span></div>
<div class="block">Returns the current manifest. The type depends on the type of media being played. May be null.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getCurrentManifest()">getCurrentManifest</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="getBufferedPercentage()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBufferedPercentage</h4>
<pre class="methodSignature">public final&nbsp;int&nbsp;getBufferedPercentage()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#getBufferedPercentage()">Player</a></code></span></div>
<div class="block">Returns an estimate of the percentage in the current content window or ad up to which data is
 buffered, or 0 if no estimate is available.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getBufferedPercentage()">getBufferedPercentage</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="isCurrentWindowDynamic()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCurrentWindowDynamic</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;isCurrentWindowDynamic()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#isCurrentWindowDynamic()">Player</a></code></span></div>
<div class="block">Returns whether the current window is dynamic, or <code>false</code> if the <a href="Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is
 empty.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#isCurrentWindowDynamic()">isCurrentWindowDynamic</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Timeline.Window.html#isDynamic"><code>Timeline.Window.isDynamic</code></a></dd>
</dl>
</li>
</ul>
<a id="isCurrentWindowLive()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCurrentWindowLive</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;isCurrentWindowLive()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#isCurrentWindowLive()">Player</a></code></span></div>
<div class="block">Returns whether the current window is live, or <code>false</code> if the <a href="Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is empty.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#isCurrentWindowLive()">isCurrentWindowLive</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Timeline.Window.html#isLive()"><code>Timeline.Window.isLive()</code></a></dd>
</dl>
</li>
</ul>
<a id="getCurrentLiveOffset()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentLiveOffset</h4>
<pre class="methodSignature">public final&nbsp;long&nbsp;getCurrentLiveOffset()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#getCurrentLiveOffset()">Player</a></code></span></div>
<div class="block">Returns the offset of the current playback position from the live edge in milliseconds, or
 <a href="C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the current window <a href="Player.html#isCurrentWindowLive()"><code>isn't live</code></a> or the
 offset is unknown.

 <p>The offset is calculated as <code>currentTime - playbackPosition</code>, so should usually be
 positive.

 <p>Note that this offset may rely on an accurate local time, so this method may return an
 incorrect value if the difference between system clock and server clock is unknown.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getCurrentLiveOffset()">getCurrentLiveOffset</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="isCurrentWindowSeekable()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCurrentWindowSeekable</h4>
<pre class="methodSignature">public final&nbsp;boolean&nbsp;isCurrentWindowSeekable()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#isCurrentWindowSeekable()">Player</a></code></span></div>
<div class="block">Returns whether the current window is seekable, or <code>false</code> if the <a href="Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is
 empty.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#isCurrentWindowSeekable()">isCurrentWindowSeekable</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="Timeline.Window.html#isSeekable"><code>Timeline.Window.isSeekable</code></a></dd>
</dl>
</li>
</ul>
<a id="getContentDuration()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContentDuration</h4>
<pre class="methodSignature">public final&nbsp;long&nbsp;getContentDuration()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="Player.html#getContentDuration()">Player</a></code></span></div>
<div class="block">If <a href="Player.html#isPlayingAd()"><code>Player.isPlayingAd()</code></a> returns <code>true</code>, returns the duration of the current content
 window in milliseconds, or <a href="C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the duration is not known. If there is no ad
 playing, the returned duration is the same as that returned by <a href="Player.html#getDuration()"><code>Player.getDuration()</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="Player.html#getContentDuration()">getContentDuration</a></code>&nbsp;in interface&nbsp;<code><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
</li>
</ul>
<a id="getAvailableCommands(com.google.android.exoplayer2.Player.Commands)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getAvailableCommands</h4>
<pre class="methodSignature">protected&nbsp;<a href="Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a>&nbsp;getAvailableCommands&#8203;(<a href="Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a>&nbsp;permanentAvailableCommands)</pre>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
